<nz-modal [(nzVisible)]="isVisible" [nzWidth]="modalWidth" (nzOnCancel)="onBack()" [nzStyle]="{'top': '50px'}">
  <div *nzModalTitle>{{ title }}</div>
  <ng-container *nzModalContent>
    <form [formGroup]="applicationRecordForm" (keydown.enter)="$event.preventDefault()">
      <nz-row [nzGutter]="10">
        <nz-col [nzSpan]="12">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="enterpriseName" nzRequired>企业名称</nz-form-label>
            <nz-form-control [nzErrorTip]="'请选择企业名称'">
              <nz-input-group nzSearch [nzAddOnAfter]="enterpriseNameSuffixIconButton">
                <input nz-input formControlName="enterpriseName" placeholder="请选择企业名称" readonly />
              </nz-input-group>
              <ng-template #enterpriseNameSuffixIconButton>
                <button nz-button nzType="primary" nzSearch (click)="findEnterprise()"><nz-icon nzType="search" /></button>
              </ng-template>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
        <nz-col [nzSpan]="12">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="jobDescriptionName" nzRequired>招聘岗位名称</nz-form-label>
            <nz-form-control [nzErrorTip]="'请选择招聘岗位名称'">
              <nz-input-group nzSearch [nzAddOnAfter]="jobDescriptionNameSuffixIconButton">
                <input nz-input formControlName="jobDescriptionName" placeholder="请选择招聘岗位名称" readonly />
              </nz-input-group>
              <ng-template #jobDescriptionNameSuffixIconButton>
                <button nz-button nzType="primary" nzSearch (click)="findJobDescription()"><nz-icon nzType="search" /></button>
              </ng-template>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
      </nz-row>
      <nz-row [nzGutter]="10">
        <nz-col [nzSpan]="12">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="candidateName" nzRequired>应聘者姓名</nz-form-label>
            <nz-form-control [nzErrorTip]="'请选择应聘者姓名'">
              <nz-input-group nzSearch [nzAddOnAfter]="candidateNameSuffixIconButton">
                <input nz-input formControlName="candidateName" placeholder="请选择应聘者姓名" readonly />
              </nz-input-group>
              <ng-template #candidateNameSuffixIconButton>
                <button nz-button nzType="primary" nzSearch (click)="findCandidate()"><nz-icon nzType="search" /></button>
              </ng-template>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
        <nz-col [nzSpan]="12">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="status" nzRequired>状态</nz-form-label>
            <nz-form-control [nzErrorTip]="'请选择状态'">
              <nz-select formControlName="status">
                <nz-option nzLabel="申请" [nzValue]="10"></nz-option>
                <nz-option nzLabel="面试邀约" [nzValue]="20"></nz-option>
                <nz-option nzLabel="录用" [nzValue]="30"></nz-option>
                <nz-option nzLabel="拒绝" [nzValue]="90"></nz-option>
              </nz-select>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
      </nz-row>
    </form>
  </ng-container>
  <div *nzModalFooter>
    <div class="form-button-container">
      <button nz-button nzType="primary" (click)="onSave()" [nzLoading]="saveLoading">保存</button>
      <button nz-button nzType="default" (click)="onReset()" [nzLoading]="saveLoading">重置</button>
      <button nz-button nzType="default" (click)="onBack()">关闭</button>
    </div>
  </div>
</nz-modal>
<enterprise-selector (enterpriseSelectedEvent)="handleEnterpriseSelectedEvent($event)"></enterprise-selector>
<job-description-selector (jobDescriptionSelectedEvent)="handleJobDescriptionSelectedEvent($event)"></job-description-selector>
<candidate-selector (candidateSelectedEvent)="handleCandidateSelectedEvent($event)"></candidate-selector>
